package com.ctsi.ssdc.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ctsi.ssdc.annotation.AutoId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.ZonedDateTime;

/**
 * @author ctsi-biyi-generator
*/
@ApiModel(description = "LitemallGoodsProduct")
@TableName("litemall_goods_product")
public class LitemallGoodsProduct extends Model<LitemallGoodsProduct> implements Serializable {
    /**
     * @Fields id 
     */
    @ApiModelProperty("")
    @AutoId(primaryKey = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value="id")
    @TableField(value="id")
    private Integer id;

    /**
     * @Fields goodsId 商品表的商品ID
     */
    @ApiModelProperty("goodsId")
    @TableField(value="goods_id")
    private Integer goodsId;

    /**
     * @Fields specifications 商品规格值列表，采用JSON数组格式
     */
    @ApiModelProperty("specifications")
    @TableField(value="specifications")
    private String specifications;

    /**
     * @Fields price 商品货品价格
     */
    @ApiModelProperty("price")
    @TableField(value="price")
    private BigDecimal price;

    /**
     * @Fields number 商品货品数量
     */
    @ApiModelProperty("number")
    @TableField(value="number")
    private Integer number;

    /**
     * @Fields url 商品货品图片
     */
    @ApiModelProperty("url")
    @TableField(value="url")
    private String url;

    /**
     * @Fields addTime 创建时间
     */
    @ApiModelProperty("addTime")
    @TableField(value="add_time")
    private ZonedDateTime addTime;

    /**
     * @Fields updateTime 更新时间
     */
    @ApiModelProperty("updateTime")
    @TableField(value="update_time")
    private ZonedDateTime updateTime;

    /**
     * @Fields deleted 逻辑删除
     */
    @ApiModelProperty("deleted")
    @TableField(value="deleted")
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    /** 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     * @return goods_id 商品表的商品ID
     */
    public Integer getGoodsId() {
        return goodsId;
    }

    /**
     * @param goodsId 商品表的商品ID
     */
    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    /** 
     * @return specifications 商品规格值列表，采用JSON数组格式
     */
    public String getSpecifications() {
        return specifications;
    }

    /**
     * @param specifications 商品规格值列表，采用JSON数组格式
     */
    public void setSpecifications(String specifications) {
        this.specifications = specifications == null ? null : specifications.trim();
    }

    /** 
     * @return price 商品货品价格
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * @param price 商品货品价格
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /** 
     * @return number 商品货品数量
     */
    public Integer getNumber() {
        return number;
    }

    /**
     * @param number 商品货品数量
     */
    public void setNumber(Integer number) {
        this.number = number;
    }

    /** 
     * @return url 商品货品图片
     */
    public String getUrl() {
        return url;
    }

    /**
     * @param url 商品货品图片
     */
    public void setUrl(String url) {
        this.url = url == null ? null : url.trim();
    }

    /** 
     * @return add_time 创建时间
     */
    public ZonedDateTime getAddTime() {
        return addTime;
    }

    /**
     * @param addTime 创建时间
     */
    public void setAddTime(ZonedDateTime addTime) {
        this.addTime = addTime;
    }

    /** 
     * @return update_time 更新时间
     */
    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime 更新时间
     */
    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /** 
     * @return deleted 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallGoodsProduct other = (LitemallGoodsProduct) that;
        return (this.getId() == null ? other.getId() == null :
				 this.getId().equals(other.getId()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null :
				 this.getGoodsId().equals(other.getGoodsId()))
            && (this.getSpecifications() == null ? other.getSpecifications() == null :
				 this.getSpecifications().equals(other.getSpecifications()))
            && (this.getPrice() == null ? other.getPrice() == null :
				 this.getPrice().equals(other.getPrice()))
            && (this.getNumber() == null ? other.getNumber() == null :
				 this.getNumber().equals(other.getNumber()))
            && (this.getUrl() == null ? other.getUrl() == null :
				 this.getUrl().equals(other.getUrl()))
            && (this.getAddTime() == null ? other.getAddTime() == null :
				 this.getAddTime().equals(other.getAddTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null :
				 this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null :
				 this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        result = prime * result + ((getSpecifications() == null) ? 0 : getSpecifications().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode());
        result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }
}